package com.blandware.atleap.webapp.form.core;

import javax.servlet.http.HttpServletRequest;
import com.blandware.atleap.webapp.form.BaseForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMessage;
import org.apache.struts.upload.FormFile;
import org.apache.struts.upload.MultipartRequestHandler;
import java.util.Map;
import java.util.HashMap;

/**
 * @struts.form name="mailTemplateForm" 
 */
public  class MailTemplateForm
    extends    BaseForm
    implements java.io.Serializable
{

    protected String mimeType;

    protected Map fromMap;

    protected Map subjectMap;

    protected Map bodyMap;

    protected Map charsetMap;

    protected String id;

    protected String version;

    /** Default empty constructor. */
    public MailTemplateForm() {}

    public String getMimeType()
    {
        return this.mimeType;
    }

   /**
    */
    public void setMimeType(String mimeType)
    {
        this.mimeType = mimeType;
    }

    public Map getFromMap()
	{
		return this.fromMap;
	}
    public Object getFrom(String key)
	{
		return this.fromMap != null ? this.fromMap.get(key) : null;
	}

   /**
    */
    public void setFromMap(Map fromMap)
	{
		this.fromMap = fromMap;
	}
    public void setFrom(String key, Object value)
	{
		if ( this.fromMap == null ) {
			this.fromMap = new HashMap();
		}
		this.fromMap.put(key, value);
	}

    public Map getSubjectMap()
	{
		return this.subjectMap;
	}
    public Object getSubject(String key)
	{
		return this.subjectMap != null ? this.subjectMap.get(key) : null;
	}

   /**
    */
    public void setSubjectMap(Map subjectMap)
	{
		this.subjectMap = subjectMap;
	}
    public void setSubject(String key, Object value)
	{
		if ( this.subjectMap == null ) {
			this.subjectMap = new HashMap();
		}
		this.subjectMap.put(key, value);
	}

    public Map getBodyMap()
	{
		return this.bodyMap;
	}
    public Object getBody(String key)
	{
		return this.bodyMap != null ? this.bodyMap.get(key) : null;
	}

   /**
    */
    public void setBodyMap(Map bodyMap)
	{
		this.bodyMap = bodyMap;
	}
    public void setBody(String key, Object value)
	{
		if ( this.bodyMap == null ) {
			this.bodyMap = new HashMap();
		}
		this.bodyMap.put(key, value);
	}

    public Map getCharsetMap()
	{
		return this.charsetMap;
	}
    public Object getCharset(String key)
	{
		return this.charsetMap != null ? this.charsetMap.get(key) : null;
	}

   /**
    */
    public void setCharsetMap(Map charsetMap)
	{
		this.charsetMap = charsetMap;
	}
    public void setCharset(String key, Object value)
	{
		if ( this.charsetMap == null ) {
			this.charsetMap = new HashMap();
		}
		this.charsetMap.put(key, value);
	}

    public String getId()
    {
        return this.id;
    }

   /**
    */
    public void setId(String id)
    {
        this.id = id;
    }

    public String getVersion()
    {
        return this.version;
    }

   /**
    */
    public void setVersion(String version)
    {
        this.version = version;
    }

    /**
     * @see org.apache.struts.action.ActionForm#reset(org.apache.struts.action.ActionMapping,
     *                                                javax.servlet.http.HttpServletRequest)
     */
    public void reset(ActionMapping mapping, HttpServletRequest request) {
        // reset any boolean data types to false

        // reset all linking properties to null

// reset all mapped properties to default values

		this.fromMap = new HashMap();

		this.subjectMap = new HashMap();

		this.bodyMap = new HashMap();

		this.charsetMap = new HashMap();

    }

}
